Integrand size = 31, antiderivative size = 62 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx=\frac {a^3 (A+3 B) \log (1-\sin (c+d x))}{d}+\frac {a^3 B \sin (c+d x)}{d}+\frac {2 a^4 (A+B)}{d (a-a \sin (c+d x))} \]
Time = 0.09 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.77 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx=\frac {a^3 \left ((A+3 B) \log (1-\sin (c+d x))-\frac {2 (A+B)}{-1+\sin (c+d x)}+B \sin (c+d x)\right )}{d} \]
Time = 0.30 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3042, 3315, 27, 86, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^3(c+d x) (a \sin (c+d x)+a)^3 (A+B \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (c+d x)+a)^3 (A+B \sin (c+d x))}{\cos (c+d x)^3}dx\) |
\(\Big \downarrow \) 3315 |
\(\displaystyle \frac {a^3 \int \frac {(\sin (c+d x) a+a) (a A+a B \sin (c+d x))}{a (a-a \sin (c+d x))^2}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a^2 \int \frac {(\sin (c+d x) a+a) (a A+a B \sin (c+d x))}{(a-a \sin (c+d x))^2}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \frac {a^2 \int \left (\frac {2 (A+B) a^2}{(a-a \sin (c+d x))^2}-\frac {(A+3 B) a}{a-a \sin (c+d x)}+B\right )d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 \left (\frac {2 a^2 (A+B)}{a-a \sin (c+d x)}+a (A+3 B) \log (a-a \sin (c+d x))+a B \sin (c+d x)\right )}{d}\) |
(a^2*(a*(A + 3*B)*Log[a - a*Sin[c + d*x]] + a*B*Sin[c + d*x] + (2*a^2*(A + B))/(a - a*Sin[c + d*x])))/d
3.10.91.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && Intege rQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]
Time = 0.46 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.65
method | result | size |
parallelrisch | \(-\frac {\left (\left (\sin \left (d x +c \right )-1\right ) \left (A +3 B \right ) \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \left (\sin \left (d x +c \right )-1\right ) \left (A +3 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {B \cos \left (2 d x +2 c \right )}{2}+\sin \left (d x +c \right ) \left (2 A +3 B \right )-\frac {B}{2}\right ) a^{3}}{d \left (\sin \left (d x +c \right )-1\right )}\) | \(102\) |
risch | \(-i x \,a^{3} A -3 i x \,a^{3} B -\frac {i {\mathrm e}^{i \left (d x +c \right )} B \,a^{3}}{2 d}+\frac {i a^{3} {\mathrm e}^{-i \left (d x +c \right )} B}{2 d}-\frac {2 i a^{3} A c}{d}-\frac {6 i a^{3} B c}{d}-\frac {4 i a^{3} {\mathrm e}^{i \left (d x +c \right )} \left (A +B \right )}{d \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{2}}+\frac {2 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}+\frac {6 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}\) | \(157\) |
derivativedivides | \(\frac {A \,a^{3} \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )+B \,a^{3} \left (\frac {\sin ^{5}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 A \,a^{3} \left (\frac {\sin ^{3}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{2}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 B \,a^{3} \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )+\frac {3 A \,a^{3}}{2 \cos \left (d x +c \right )^{2}}+3 B \,a^{3} \left (\frac {\sin ^{3}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{2}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+A \,a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+\frac {B \,a^{3}}{2 \cos \left (d x +c \right )^{2}}}{d}\) | \(273\) |
default | \(\frac {A \,a^{3} \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )+B \,a^{3} \left (\frac {\sin ^{5}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 A \,a^{3} \left (\frac {\sin ^{3}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{2}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 B \,a^{3} \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )+\frac {3 A \,a^{3}}{2 \cos \left (d x +c \right )^{2}}+3 B \,a^{3} \left (\frac {\sin ^{3}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{2}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+A \,a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+\frac {B \,a^{3}}{2 \cos \left (d x +c \right )^{2}}}{d}\) | \(273\) |
norman | \(\frac {\frac {48 A \,a^{3}+48 B \,a^{3}}{4 d}+\frac {\left (48 A \,a^{3}+48 B \,a^{3}\right ) \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (64 A \,a^{3}+64 B \,a^{3}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {\left (64 A \,a^{3}+64 B \,a^{3}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {\left (80 A \,a^{3}+80 B \,a^{3}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (80 A \,a^{3}+80 B \,a^{3}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {2 a^{3} \left (2 A +3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a^{3} \left (2 A +3 B \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a^{3} \left (10 A +9 B \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a^{3} \left (10 A +9 B \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a^{3} \left (10 A +11 B \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a^{3} \left (10 A +11 B \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {2 a^{3} \left (A +3 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {a^{3} \left (A +3 B \right ) \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(403\) |
-((sin(d*x+c)-1)*(A+3*B)*ln(sec(1/2*d*x+1/2*c)^2)-2*(sin(d*x+c)-1)*(A+3*B) *ln(tan(1/2*d*x+1/2*c)-1)+1/2*B*cos(2*d*x+2*c)+sin(d*x+c)*(2*A+3*B)-1/2*B) *a^3/d/(sin(d*x+c)-1)
Time = 0.29 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.44 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx=-\frac {B a^{3} \cos \left (d x + c\right )^{2} + B a^{3} \sin \left (d x + c\right ) + {\left (2 \, A + B\right )} a^{3} - {\left ({\left (A + 3 \, B\right )} a^{3} \sin \left (d x + c\right ) - {\left (A + 3 \, B\right )} a^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{d \sin \left (d x + c\right ) - d} \]
-(B*a^3*cos(d*x + c)^2 + B*a^3*sin(d*x + c) + (2*A + B)*a^3 - ((A + 3*B)*a ^3*sin(d*x + c) - (A + 3*B)*a^3)*log(-sin(d*x + c) + 1))/(d*sin(d*x + c) - d)
\[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx=a^{3} \left (\int A \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 A \sin {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 A \sin ^{2}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int A \sin ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int B \sin {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 B \sin ^{2}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 B \sin ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int B \sin ^{4}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx\right ) \]
a**3*(Integral(A*sec(c + d*x)**3, x) + Integral(3*A*sin(c + d*x)*sec(c + d *x)**3, x) + Integral(3*A*sin(c + d*x)**2*sec(c + d*x)**3, x) + Integral(A *sin(c + d*x)**3*sec(c + d*x)**3, x) + Integral(B*sin(c + d*x)*sec(c + d*x )**3, x) + Integral(3*B*sin(c + d*x)**2*sec(c + d*x)**3, x) + Integral(3*B *sin(c + d*x)**3*sec(c + d*x)**3, x) + Integral(B*sin(c + d*x)**4*sec(c + d*x)**3, x))
Time = 0.22 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.84 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx=\frac {{\left (A + 3 \, B\right )} a^{3} \log \left (\sin \left (d x + c\right ) - 1\right ) + B a^{3} \sin \left (d x + c\right ) - \frac {2 \, {\left (A + B\right )} a^{3}}{\sin \left (d x + c\right ) - 1}}{d} \]
((A + 3*B)*a^3*log(sin(d*x + c) - 1) + B*a^3*sin(d*x + c) - 2*(A + B)*a^3/ (sin(d*x + c) - 1))/d
Leaf count of result is larger than twice the leaf count of optimal. 228 vs. \(2 (63) = 126\).
Time = 0.34 (sec) , antiderivative size = 228, normalized size of antiderivative = 3.68 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx=-\frac {{\left (A a^{3} + 3 \, B a^{3}\right )} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 2 \, {\left (A a^{3} + 3 \, B a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + A a^{3} + 3 \, B a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + \frac {3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 9 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 10 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 22 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A a^{3} + 9 \, B a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{2}}}{d} \]
-((A*a^3 + 3*B*a^3)*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 2*(A*a^3 + 3*B*a^3)* log(abs(tan(1/2*d*x + 1/2*c) - 1)) - (A*a^3*tan(1/2*d*x + 1/2*c)^2 + 3*B*a ^3*tan(1/2*d*x + 1/2*c)^2 + 2*B*a^3*tan(1/2*d*x + 1/2*c) + A*a^3 + 3*B*a^3 )/(tan(1/2*d*x + 1/2*c)^2 + 1) + (3*A*a^3*tan(1/2*d*x + 1/2*c)^2 + 9*B*a^3 *tan(1/2*d*x + 1/2*c)^2 - 10*A*a^3*tan(1/2*d*x + 1/2*c) - 22*B*a^3*tan(1/2 *d*x + 1/2*c) + 3*A*a^3 + 9*B*a^3)/(tan(1/2*d*x + 1/2*c) - 1)^2)/d
Time = 0.09 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.02 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx=\frac {\ln \left (\sin \left (c+d\,x\right )-1\right )\,\left (A\,a^3+3\,B\,a^3\right )-\frac {2\,A\,a^3+2\,B\,a^3}{\sin \left (c+d\,x\right )-1}+B\,a^3\,\sin \left (c+d\,x\right )}{d} \]